package com.fafa.swing.richclient02;

import javax.swing.*;
import java.awt.*;
import java.awt.image.BufferedImage;

/**
 * @author : fafa
 * @version V1.0
 * @Project: SwingTest
 * @Package com.fafa.swing.richclient02
 * @Description: HighlightedButton
 * @date Date : 2019年11月27日 21:58
 */
public class HighlightedButton extends JButton {

    BufferedImage highlight;
    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        g.drawImage(highlight,getWidth()/4,getHeight()/4,null);
    }

    public HighlightedButton(){
        super();
    }

    public HighlightedButton(String text){
        super(text);
    }
}
